<?php 
$time = time();
$sql = "update tttj.tuan set dstatus=3 where dstatus=1 and etime<$time";
exec_db($sql);
?>